<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s"  uri="/struts-tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/common.css" type="text/css" />
<script type="text/javascript" charset="utf-8" src="ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
window.UEDITOR_HOME_URL = "ueditor/";
</script>
<title></title>
</head>
<body>
	<div id="man_zone">
		<form action="doc_update.action" method="post">
		<input type="hidden" name="doc_id"  value="${sessionScope.doc.doc_id}"/>
		<input type="hidden" name="create_time"  value="${sessionScope.doc.create_time}"/>
			<table class="dataintable">
				<caption>修改文档</caption>
				<tr>
					<th width="10%">标题</th>
					<td><input type="text" name="doc_title"  value="${sessionScope.doc.doc_title}" style="width: 50%"/></td>
				</tr>
				<tr>
					<th width="10%">分类</th>
					<td>
						<select name="type_id">
						<%-- <s:debug></s:debug> --%>
						<!-- <option>1</option> -->
							<s:iterator value="#session.docTypes" var="u" status="status">
								<s:if test="%{#session.doc.docType.type_name==#u.type_name}">
									<option value="<s:property value="#u.type_id"/>" selected="selected">
									
										<s:property value="#u.type_name"/>
									</option>
								</s:if>
								<s:else>
									<option value="<s:property value="#u.type_id"/>" >
										<s:property value="#u.type_name"/>
									</option>
								</s:else>
							</s:iterator>
						</select>
					</td>
				</tr>
				<tr>
					<th width="10%">作者</th>
					<td>
						<input type="text" name="author"  value="${sessionScope.doc.author}" style="width: 50%"/>
					</td>
				</tr>
				<tr>
					<td></td>
					<td width="90%">
						<script id="container" name="doc_content" type="text/plain">
   							 ${sessionScope.doc.doc_content}
						</script>
						<script type="text/javascript">
						    var editor = UE.getEditor('container')
						</script>
					</td>
				</tr>
				<tr>
					<td colspan="2" align="center">
						<font color="red"><s:property value="message"/></font>
						<input type="submit" class="button blue medium" value="保存" />&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="reset" class="button blue medium" value="重置" />
					</td>
				</tr>
			</table>
			<br/><br/><br/>
		</form>
	</div>
</body>
</html>